package com.depth.viewer.widget.definition
{
	import com.depth.viewer.container.definition.IWidgetContainerDefinition;
	import com.depth.viewer.loader.LoadUrlSystem;
	import com.depth.viewer.widget.WidgetStates;
	
	import flash.utils.Dictionary;
	
	import mx.collections.ArrayCollection;
	
	import org.springextensions.actionscript.context.support.XMLApplicationContext;
	import org.springextensions.actionscript.puremvc.patterns.facade.IocFacade;
	
	public class BaseWidgetDefinition implements IBaseWidgetDefinition
	{
		private var _id:String;
		private var _url:String;
		private var _proxys:ArrayCollection;
		private var _mediators:ArrayCollection;
		private var _commands:ArrayCollection;
		private var _autoRun:Boolean;
		private var _priorityLevel:int = -1;
		private var _autoLoadDelay:int;
		private var _config:String;
		[Bindable]
		private var _icon:String;
		[Bindable]
		private var _label:String;
		private var _x:Number;
		private var _y:Number;
		private var _z:Number = -1;
		private var _left:Object;
		private var _top:Object;
		private var _right:Object;
		private var _bottom:Object;
		private var _display:Boolean = true;
		private var _modalPopup:Boolean;
		private var _centerPopupMode:Boolean = false;
		private var _popupMode:Boolean = false;
		private var _container:IWidgetContainerDefinition;
		private var _context:XMLApplicationContext;
		private var _facade:IocFacade;
		private var _importWidgets:Array;
		private var _beanNames:Dictionary;
		private var _isBaseWidget:Boolean;
		private var _runingParams:Object;
		private var _map:Object;
		private var _widgetState:String = WidgetStates.WIDGET_UNLOADED;
		public function get autoLoadDelay():int
		{
			return _autoLoadDelay;
		}

		public function set autoLoadDelay(value:int):void
		{
			_autoLoadDelay = value;
		}

		public function set beanNames(value:Dictionary):void{
			this._beanNames = value;	
		}
		public	function get beanNames():Dictionary{
			return this._beanNames;
		}
		public function BaseWidgetDefinition()
		{
		}
		
		public function get id():String
		{
			return this._id;
		}
		
		public function set id(value:String):void
		{
			this._id = value;
		}
		
		public function get url():String
		{
			return LoadUrlSystem.instance.getURL(this._url);
		}
		
		public function get facade():IocFacade{
			return this._facade;
		}
		public function set facade(value:IocFacade):void{
			this._facade = value;
		}
		
		public function get context():XMLApplicationContext{
			return this._context;
		}
		public function set context(value:XMLApplicationContext):void{
			this._context = value;
		}
		public function set url(value:String):void
		{
			this._url = value;
		}
		
		
		
		public function set autoRun(value:Boolean):void
		{
			this._autoRun = value;
		}
		
		public function get autoRun():Boolean
		{
			return this._autoRun;
		}
		
		public function set priorityLevel(value:int):void
		{
			this._priorityLevel = value;
		}
		
		public function get priorityLevel():int
		{
			return this._priorityLevel;
		}
		
		
		public function set config(value:String):void
		{
			this._config = value;
		}
		
		public function get config():String
		{
			return LoadUrlSystem.instance.getURL(this._config);
		}
		
		public function set label(value:String):void
		{
			this._label = value;
		}
		
		public function get label():String
		{
			return this._label;
		}
		
		public function set x(value:Number):void
		{
			this._x = value;
		}
		
		public function get x():Number
		{
			return this._x;
		}
		public function set y(value:Number):void
		{
			this._y = value;
		}
		
		public function get y():Number
		{
			return this._y;
		}
		public function set z(value:Number):void
		{
			this._z = value;
		}
		
		public function get z():Number
		{
			return this._z;
		}
		
		public function set left(value:Object):void
		{
			this._left = value;
		}
		
		public function get left():Object
		{
			return this._left;
		}
		
		public function set top(value:Object):void
		{
			this._top = value;
		}
		
		public function get top():Object
		{
			return this._top;
		}
		
		public function set right(value:Object):void
		{
			this._right = value;
		}
		
		public function get right():Object
		{
			return this._right;
		}
		
		public function set bottom(value:Object):void
		{
			this._bottom = value;
		}
		
		public function get bottom():Object
		{
			return this._bottom;
		}
		
		public function set modalPopup(value:Boolean):void
		{
			this._modalPopup = value;
		}
		
		public function get modalPopup():Boolean
		{
			return this._modalPopup;
		}
		
		public function set popupMode(value:Boolean):void{
			this._popupMode = value;
		}
		public function get popupMode():Boolean{
			return this._popupMode;	
		}
		public function set centerPopupMode(value:Boolean):void{
			this._centerPopupMode = value;
		}
		public function get centerPopupMode():Boolean{
			return this._centerPopupMode;	
		}
		public function set display(value:Boolean):void
		{
			this._display = value;
		}
		public function get display():Boolean
		{
			return this._display;
		}
		
		public function get icon():String{
			return this._icon;
		}
		public	function set icon(value:String):void{
			this._icon = value;
		}
		
		public function set container(value:IWidgetContainerDefinition):void
		{
			this._container = value;
		}
		
		public function get container():IWidgetContainerDefinition
		{
			return this._container;
		}
		
		public function get importWidgets():Array{
			return this._importWidgets;
		}
		public function set importWidgets(value:Array):void{
			this._importWidgets = value;
		}
		
		public function set isBaseWidget(value:Boolean):void{
			this._isBaseWidget = value;
		}
		public function get isBaseWidget():Boolean{
			return _isBaseWidget;
		}
		public function set runingParams(value:Object):void{
			this._runingParams = value;
		}
		public function get runingParams():Object{
			return this._runingParams;
		}
		public function set widgetState(value:String):void{
			this._widgetState = value;
		}
		public function get widgetState():String{
			return this._widgetState;
		}
	}
}